package com.clayecloud.module_login.ui.activity;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import androidx.lifecycle.ViewModelProvider;

import android.os.Bundle;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.clayecloud.module_login.R;
import com.clayecloud.module_login.databinding.ActivityBindUserInfoBinding;
import com.clayecloud.module_login.viewModels.BindUserInfoViewModel;
import com.clayecloud.module_login.viewModels.LoginActivityViewModel;
import com.gyf.immersionbar.ImmersionBar;

@Route(path = "/login/bindUserInfo/index")
/**
 * 暂不使用 引导填写信息界面
 */
public class BindUserInfoActivity extends AppCompatActivity {

    private ActivityBindUserInfoBinding activityBindUserInfoBinding;
    private BindUserInfoViewModel bindUserInfoViewModel;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        activityBindUserInfoBinding = DataBindingUtil.setContentView(this, R.layout.activity_bind_user_info);
        ViewModelProvider.Factory factory = ViewModelProvider.AndroidViewModelFactory.getInstance(getApplication());
        ViewModelProvider viewModelProvider = new ViewModelProvider(this, factory);
        bindUserInfoViewModel = viewModelProvider.get(BindUserInfoViewModel.class);
        bindUserInfoViewModel.leadData();   // 进行数据初始化
        activityBindUserInfoBinding.setBindUserInfo(bindUserInfoViewModel); // 将数据模型绑定到页面
        //沉浸式状态栏
        ImmersionBar.with(this).statusBarDarkFont(true).init();
    }
}